Index  Decision Records ADR-177: Pie Chart of Decision Record Types on Overview Page

ADR-177: Pie Chart of Decision Record Types on Overview Page

1 Status

Date Status
20-05-2026 Proposed
Accepted
In-Progress
Implemented

2 Context

The Decision Records Overview page (build/decisions/overview.html) lists every decision record as a single table. As the project accumulates records the table grows, and a reader has no top-of-page summary of what kinds of decisions exist or in what proportion.

There is currently no chart rendering capability anywhere in Almirah — all rendered outputs are HTML + CSS over Markdown-derived content. Introducing visualization is an architectural step (new external JS dependency), which is why this is an ADR rather than an ENH.

3 Decision

Add a pie chart above the table on the Decision Records Overview page that visualizes the count of decision records grouped by their type prefix (ADR, ENH, ISSUE).

Architectural choices:

  1. Charting library: Chart.js. Loaded from a public CDN (https://cdn.jsdelivr.net/npm/chart.js), following the existing precedent of loading Font Awesome from a CDN in templates/page.html. No build step is added; no JS bundler is introduced. Chart.js is included only on the Decision Records Overview page, not on every rendered page.
  2. Page layout: 3-column CSS grid above the table. A new container element above <table class="controlled decisions_overview"> shall use display: grid; grid-template-columns: repeat(3, 1fr). The pie chart shall occupy the leftmost column. The middle and right columns shall be empty placeholders, reserved for two further charts that are out of scope of this ADR. The grid is the architectural commitment; the additional charts are not.
  3. Data source: in-renderer aggregation. DecisionsOverview#to_html shall count records per record_type from @project.project_data.decisions and emit the counts as a JSON literal inside an inline <script> tag adjacent to the <canvas>. No new data pipeline, parser, or AJAX call is introduced.
  4. Rendering trigger: inline script on the page. A small inline <script> instantiates new Chart(ctx, { type: 'pie', data: ... }) against a <canvas id="decisions_type_pie">. No shared chart-rendering helper is extracted yet — that abstraction is deferred until the second chart lands.

4 Scope

Item Status Start Date Target Date Description
Code Implemented 20-05-2026 23-05-2026 Implementation

No new requirements documents, test protocols, or end-to-end tests are introduced — this is a presentation change and is verified by visual inspection of the rendered overview page.

5 Out of Scope

6 Consequences

6.1 Positive

6.2 Negative

6.3 Neutral

7 Alternatives Considered

8 Software Versions

Software Version Category Software Version ID
Latest Released Version 0.3.1
Issue Found in Version 0.4.0
Target Release Version 0.4.0

9 References

10 Review Evidences